<template>
  <div class="detailswiper-box">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="item of imgList" :key="item.path">
        <img :src="staticpath+item.path" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  name: "detailswiper",
  props: {
    imgList: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {
      staticpath: localStorage.getItem("staticpath"),
    };
  },
};
</script>

<style scoped>
.detailswiper-box {
  height: 185px;
}
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  height: 185px;
}
.my-swipe .van-swipe-item img {
  height: 100%;
  width: 100%;
}
</style>